<template>
  <el-form label-position="top" class="p-10">
    <el-form-item label="默认题目">
      <VW v-model="activeData.extConfig.DefaultTopicList">
        <el-input
          v-model="activeData.extConfig.DefaultTopicList"
          placeholder="数组"
        />
      </VW>
    </el-form-item>
    <el-form-item label="管理员权限">
      <VW v-model="activeData.extConfig.isManager">
        <el-input
          v-model="activeData.extConfig.isManager"
          placeholder="布尔值"
        />
      </VW>
    </el-form-item>
    <el-form-item label="是否统计">
      <VW v-model="activeData.extConfig.isResult">
        <el-input
          v-model="activeData.extConfig.isResult"
          placeholder="布尔值"
        />
      </VW>
    </el-form-item>
  </el-form>
</template>
<script>
import { debounce } from 'lodash'
export default {
    name:'examination-config',
    props:['activeData'],
    data(){
      return {
        separator: '&',
        optionArr: []
      }
    },
    computed:{
    },
    watch:{
    },
    mounted() {
    },
    methods: {
      addTopic(type) {
        console.log(type)
        this.activeData.extConfig.topicList.push({
          type,
          question: '',
          options: '', //分隔符&
          required: false
        })
        this.optionArr = this.activeData.extConfig.topicList && this.activeData.extConfig.topicList.map(v =>v.options && v.options.split(this.separator) || [''])
      },
      addOptions(data) {
        console.log('addOptions',data)
        data.push('')
      },
      inputOPtions(aa, bb) {
        console.log(aa,bb)
      }
    },
}
</script>

<style lang="scss" scoped>
.select-item {
  display: flex;
  flex-wrap: wrap;
  border: 1px dashed #fff;
  box-sizing: border-box;
  padding: 2px 0px;
  & .delete-btn {
    cursor: pointer;
    // color: #f56c6c;
    font-size: 20px;
    color: #b6b2b2;
    line-height: 35px;
    margin-left: 5px;
  }
  & .el-input + .el-input {
    margin-left: 4px;
  }
  &:hover {
    background: #efefef;
  }
  .select-line-icon {
    line-height: 32px;
    font-size: 16px;
    padding: 0 4px;
    color: #777;
  }
  .option-drag {
    cursor: move;
  }
  .options {
    display: flex;
    width: 75%;
    margin-top: 9px;
    .el-input {
      flex: 1;
    }
    .action {
      cursor: pointer;
      line-height: 30px;
      margin: 0 5px;
      font-size: 20px;
      color: #b6b2b2;
    }
  }
}
.ml-30 {
  margin-left: 30px;
}
.addTopic {
  width: 90%;
  margin-top: 5px;
}
</style>